package com.jh.user.service.impl;

import com.jh.user.service.RiskClient;
import com.jh.user.service.RiskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;


/**
 * @author Fuchun
 * @since 1.0
 */
@Service("riskService")
public class RiskServiceImpl implements RiskService {

    private final RiskClient riskClient;

    @Autowired
    public RiskServiceImpl(RiskClient riskClient) {
        this.riskClient = riskClient;
    }

    @Override
    public Map<String, Object> isInBlacklist(String phone, String type) {
        // cache, other logic etc.
        return riskClient.getWhitelist(phone, type);
    }
}
